/*******************************************************************/
/* @ All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.        */
/*                                                                 */
/*  NAME      = ibmmq_analysis.h                                   */
/*  NOTE      =                                                    */
/*  DATE      = 2015/06/03 by wuwk                                 */
/*******************************************************************/
#ifndef __IBMMQ_ANALYSIS_H_
#define __IBMMQ_ANALYSIS_H_

#define IBMMQ_INITIAL            0x01
#define IBMMQ_RESYNC             0x02
#define IBMMQ_RESET              0x03
#define IBMMQ_MESSAGE            0x04
#define IBMMQ_STATUS             0x05
#define IBMMQ_SECURITY           0x06
#define IBMMQ_PING               0x07
#define IBMMQ_USERID             0x08
#define IBMMQ_HEARTBEAT          0x09
#define IBMMQ_CONAUTH_INFO       0x0A
#define IBMMQ_RENEGOTIATE_DATA   0x0B
#define IBMMQ_SOCKET_ACTION      0x0C
#define IBMMQ_ASYNC_MESSAGE      0x0D
#define IBMMQ_REQUEST_MSGS       0x0E
#define IBMMQ_NOTIFICATION       0x0F
#define IBMMQ_MQCONN             0x81
#define IBMMQ_MQDISC             0x82
#define IBMMQ_MQOPEN             0x83
#define IBMMQ_MQCLOSE            0x84
#define IBMMQ_MQGET              0x85
#define IBMMQ_MQPUT              0x86
#define IBMMQ_MQPUT1             0x87
#define IBMMQ_MQSET              0x88
#define IBMMQ_MQINQ              0x89
#define IBMMQ_MQCMIT             0x8A
#define IBMMQ_MQBACK             0x8B
#define IBMMQ_SPI                0x8C
#define IBMMQ_MQSTAT             0x8D
#define IBMMQ_MQSUB              0x8E
#define IBMMQ_MQSUBRQ            0x8F
#define IBMMQ_MQCONN_REPLY       0x91
#define IBMMQ_MQDISC_REPLY       0x92
#define IBMMQ_MQOPEN_REPLY       0x93
#define IBMMQ_MQCLOSE_REPLY      0x94
#define IBMMQ_MQGET_REPLY        0x95
#define IBMMQ_MQPUT_REPLY        0x96
#define IBMMQ_MQPUT1_REPLY       0x97
#define IBMMQ_MQSET_REPLY        0x98
#define IBMMQ_MQINQ_REPLY        0x99
#define IBMMQ_MQCMIT_REPLY       0x9A
#define IBMMQ_MQBACK_REPLY       0x9B
#define IBMMQ_SPI_REPLY          0x9C
#define IBMMQ_MQSTAT_REPLY       0x9D
#define IBMMQ_MQSUB_REPLY        0x9E
#define IBMMQ_MQSUBRQ_REPLY      0x9F
#define IBMMQ_XA_START           0xA1
#define IBMMQ_XA_END             0xA2
#define IBMMQ_XA_OPEN            0xA3
#define IBMMQ_XA_CLOSE           0xA4
#define IBMMQ_XA_PREPARE         0xA5
#define IBMMQ_XA_COMMIT          0xA6
#define IBMMQ_XA_ROLLBACK        0xA7
#define IBMMQ_XA_FORGET          0xA8
#define IBMMQ_XA_RECOVER         0xA9
#define IBMMQ_XA_COMPLETE        0xAA
#define IBMMQ_XA_START_REPLY     0xB1
#define IBMMQ_XA_END_REPLY       0xB2
#define IBMMQ_XA_OPEN_REPLY      0xB3
#define IBMMQ_XA_CLOSE_REPLY     0xB4
#define IBMMQ_XA_PREPARE_REPLY   0xB5
#define IBMMQ_XA_COMMIT_REPLY    0xB6
#define IBMMQ_XA_ROLLBACK_REPLY  0xB7
#define IBMMQ_XA_FORGET_REPLY    0xB8
#define IBMMQ_XA_RECOVER_REPLY   0xB9
#define IBMMQ_XA_COMPLETE_REPLY  0xBA

#define IBMMQ_MQFMT_ADMIN        "MQADMIN "
#define IBMMQ_MQFMT_EVENT        "MQEVENT "
#define IBMMQ_MQFMT_PCF          "MQPCF   "

/* Types of Structure */
#define IBMMQ_MQCFT_NONE                     0
#define IBMMQ_MQCFT_COMMAND                  1
#define IBMMQ_MQCFT_RESPONSE                 2
#define IBMMQ_MQCFT_INTEGER                  3
#define IBMMQ_MQCFT_STRING                   4
#define IBMMQ_MQCFT_INTEGER_LIST             5
#define IBMMQ_MQCFT_STRING_LIST              6
#define IBMMQ_MQCFT_EVENT                    7
#define IBMMQ_MQCFT_USER                     8
#define IBMMQ_MQCFT_BYTE_STRING              9
#define IBMMQ_MQCFT_TRACE_ROUTE              10
#define IBMMQ_MQCFT_REPORT                   12
#define IBMMQ_MQCFT_INTEGER_FILTER           13
#define IBMMQ_MQCFT_STRING_FILTER            14
#define IBMMQ_MQCFT_BYTE_STRING_FILTER       15
#define IBMMQ_MQCFT_COMMAND_XR               16
#define IBMMQ_MQCFT_XR_MSG                   17
#define IBMMQ_MQCFT_XR_ITEM                  18
#define IBMMQ_MQCFT_XR_SUMMARY               19
#define IBMMQ_MQCFT_GROUP                    20
#define IBMMQ_MQCFT_STATISTICS               21
#define IBMMQ_MQCFT_ACCOUNTING               22
#define IBMMQ_MQCFT_INTEGER64                23
#define IBMMQ_MQCFT_INTEGER64_LIST           25
#define IBMMQ_MQCFT_APP_ACTIVITY             26

int ibmmq_analysis_head(char *p_data
                      , unsigned int ui_head_len
                      , L7_head_ibmmq **pp_st_head);
int ibmmq_analysis_body(Conntrack *p_st_conn
                      , Apm_packet *p_st_packet
                      , Frbyte_Packet *p_st_data
                      , Frreport_body_data *p_st_body_data
                      , L7session_ibmmq_private *p_st_private
                      , int i_req_resp);

#endif
